package com.person.webdemoproject2.mapper;

import com.person.webdemoproject2.pojo.*;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Update;

@Mapper
public interface UploadMapper {
    @Insert("insert into tb_text (textcontent, userid, create_time, update_time) VALUES (#{textcontent},#{userid},#{create_time},#{update_time})")
    void uploadtext(Text text);

    @Update("update tb_user SET picture =#{picture} where id=#{id}")
    void uploadphoto(User user);

    void uploadpost(Post post);
    @Insert("INSERT INTO videoweb.tb_comment(userid, comment, postid, create_time, update_time) VALUES (#{userid},#{comment},#{postid},#{create_time},#{update_time})")
    void uploadComment(Comment comment);
    @Insert("INSERT INTO tb_recomment (userid, comment, comment_id, create_time, update_time) VALUES (#{userid},#{comment},#{comment_id},#{create_time},#{update_time})")
    void uploadreComment(reComment recomment);
}
